package com.tdkj.model.risevalue;

import java.sql.Timestamp;
import java.util.Date;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.OrderBy;
import javax.persistence.Table;

import com.tdkj.model.base.BaseEntity;
import com.tdkj.model.user.BeanUser;

/**
 * XnkyAdvertAuction2user entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "risevalue_advert_auction_info")
public class BeanAdvertAuctionInfo extends BaseEntity implements java.io.Serializable {
	
	private int round;//竞拍的轮次
	private Timestamp astarttime;//竞价开始时间
	private Timestamp aendtime;//竞价结束时间
	private Timestamp starttime;//广告位开始使用时间
	private Timestamp endtime;//广告位结束使用时间
	private Timestamp auctiontime;//用户竞价时间
	private String status;//基本状态:空闲、开始竞价、竞价结束
	private String auditstatus;//审核状态：未审核
	private String paystatus;//付款状态
	private String workingstatus;//使用状态：空闲、使用中、已过期
	private BeanAuctionRule auctionrule ;//竞价规则
	private List<BeanAdvertAuctionBidInfo> auctionbidinfos;//出价记录
	private int startprice;//开始价格
	private int startpriceMargin;//加价幅度
	private int endprice;//最终成交价格
	private String currency;//币种
	private int timeinterval;//时间间隔
	private String unit;//时间单位：分钟和小时
	private String fileurl;//文件路径
	private BeanUser user; 
	private BeanAdvert advert ;
	@Column(name = "round", length = 40)
	public int getRound() {
		return round;
	}
	public void setRound(int round) {
		this.round = round;
	}
	@Column(name = "timeinterval")
	public int getTimeinterval() {
		return timeinterval;
	}
	public void setTimeinterval(int timeinterval) {
		this.timeinterval = timeinterval;
	}
	@Column(name = "unit", length = 40)
	public String getUnit() {
		return unit;
	}
	public void setUnit(String unit) {
		this.unit = unit;
	}
	@Column(name = "workingstatus", length = 40)
	public String getWorkingstatus() {
		return workingstatus;
	}
	public void setWorkingstatus(String workingstatus) {
		this.workingstatus = workingstatus;
	}
	@Column(name = "astarttime", length = 19)
	public Timestamp getAstarttime() {
		return astarttime;
	}
	public void setAstarttime(Timestamp astarttime) {
		this.astarttime = astarttime;
	}
	@Column(name = "aendtime", length = 19)
	public Timestamp getAendtime() {
		return aendtime;
	}
	public void setAendtime(Timestamp aendtime) {
		this.aendtime = aendtime;
	}
	@Column(name = "starttime", length = 19)
	public Timestamp getStarttime() {
		return starttime;
	}
	public void setStarttime(Timestamp starttime) {
		this.starttime = starttime;
	}
	@Column(name = "endtime", length = 19)
	public Timestamp getEndtime() {
		return endtime;
	}
	public void setEndtime(Timestamp endtime) {
		this.endtime = endtime;
	}
	@Column(name = "auctiontime", length = 19)
	public Timestamp getAuctiontime() {
		return auctiontime;
	}
	public void setAuctiontime(Timestamp auctiontime) {
		this.auctiontime = auctiontime;
	}
	@Column(name = "status", length = 40)
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	@Column(name = "auditstatus", length = 40)
	public String getAuditstatus() {
		return auditstatus;
	}
	public void setAuditstatus(String auditstatus) {
		this.auditstatus = auditstatus;
	}
	@Column(name = "paystatus", length = 40)
	public String getPaystatus() {
		return paystatus;
	}
	public void setPaystatus(String paystatus) {
		this.paystatus = paystatus;
	}
	public String getFileurl() {
		return fileurl;
	}
	public void setFileurl(String fileurl) {
		this.fileurl = fileurl;
	}
	public int getStartprice() {
		return startprice;
	}
	public void setStartprice(int startprice) {
		this.startprice = startprice;
	}
	public int getEndprice() {
		return endprice;
	}
	public void setEndprice(int endprice) {
		this.endprice = endprice;
	}
	@Column(name = "currency", length = 40)
	public String getCurrency() {
		return currency;
	}
	public void setCurrency(String currency) {
		this.currency = currency;
	}
	@ManyToOne(cascade = CascadeType.REFRESH, fetch = FetchType.LAZY)
	@JoinColumn(name = "auctionruleid")
	public BeanAuctionRule getAuctionrule() {
		return auctionrule;
	}
	public void setAuctionrule(BeanAuctionRule auctionrule) {
		this.auctionrule = auctionrule;
	}
	@OneToMany(fetch = FetchType.LAZY, cascade = { CascadeType.ALL }, mappedBy = "auctioninfo")
	public List<BeanAdvertAuctionBidInfo> getAuctionbidinfos() {
		return auctionbidinfos;
	}
	public void setAuctionbidinfos(List<BeanAdvertAuctionBidInfo> auctionbidinfos) {
		this.auctionbidinfos = auctionbidinfos;
	}
	@ManyToOne(cascade = CascadeType.REFRESH, fetch = FetchType.LAZY)
	@JoinColumn(name = "userid")
	public BeanUser getUser() {
		return user;
	}
	public void setUser(BeanUser user) {
		this.user = user;
	}
	@ManyToOne(cascade = CascadeType.REFRESH, fetch = FetchType.LAZY)
	@JoinColumn(name = "advertid")
	public BeanAdvert getAdvert() {
		return advert;
	}
	public void setAdvert(BeanAdvert advert) {
		this.advert = advert;
	}
	public int getStartpriceMargin() {
		return startpriceMargin;
	}
	public void setStartpriceMargin(int startpriceMargin) {
		this.startpriceMargin = startpriceMargin;
	}
	
}